#include"Slist.h"
void Slist01()
{
	SLTNode* node1 = (SLTNode*)malloc(sizeof(SLTNode));
	node1->a = 1;
	SLTNode* node2 = (SLTNode*)malloc(sizeof(SLTNode));
	node2->a = 2;
	SLTNode* node3 = (SLTNode*)malloc(sizeof(SLTNode));
	node3->a = 3;
	node1->next = node2;
	node2->next = node3;
	node3->next = NULL;

	SLTNode* plist = node1;
	SLTPrint(plist);
	SLTPopFront(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPushFront(&plist, 1);
	SLTPrint(plist);
	SLTPushBack(&plist, 3);
	SLTPrint(plist);
	SLTNode* finde = SLTFind(plist, 2);
	SLTInsert(&plist, finde, 4);
	SLTPrint(plist);
	SLTNode* finde1 = SLTFind(plist, 2);
	SLTInsertAfter(finde1,5);
	SLTPrint(plist);
	SLTErase(&plist, finde1);
	SLTPrint(plist);
	SLTEraseAfter(finde1);
	SLTPrint(plist);
	SListDesTroy(&plist);
	SLTPrint(plist);

}
int main()
{
	Slist01();
	return 0;
}